const koa = require("koa");
const bodyParser = require("koa-bodyparser");
const registerRouters = require("../router/index.js");
//1.注册swagger
const registerSwagger = require("../config/swagger.js");

//1.创建app
const app = new koa();
//2.app使用中间件
app.use(bodyParser());
registerSwagger(app);
registerRouters(app);
module.exports = app;
